var mongoose = require('../common/db');

var article = new mongoose.Schema({
  articleTitle: String,
  articleContext: String,
  articleTime: String,
});

article.statics.findByArticleId = function(id, callback) {
  this.find({ _id: id }, callback);
};

article.statics.findAll = function(callback) {
  this.find({}, callback);
};

var articleModel = mongoose.model('article', article);
module.exports = articleModel;
